#!/bin/bash

set -e

if [[ -n "${GT_CHATTA_DEBUG}" ]]; then
    set -x
fi

function usage() {
    echo -n \
"Usage: $(basename "$0")
Build application for staging or release.
"
}

if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
    if [ "${1:-}" = "--help" ]; then
        usage
    else

        docker-compose run --rm gt-chatta clean

        echo "Running tests..."
        ./scripts/test
    fi
fi
